import axios from 'axios';
import React, { useEffect, useState } from 'react';
import {useParams} from 'react-router-dom'
import './index.css'
const Index = () => {
    let params =useParams()
    const [musics,setMusics] =useState({})
    const fecthData =()=>{
        
    }
    useEffect(()=>{
        axios.get(`http://122.112.161.135:3000/playlist/detail?id=${params.id}`).then(res=>{
            setMusics(res.data.playlist)
        })
    },[])
    return (
        <div>
            <img className="nav"  src={musics.coverImgUrl} alt="" />
            <p>{musics.name}</p>
        </div>
    );
}

export default Index;
